import time
from python_baway.common.xcommon import sep

FMT = '%Y-%m-%d %H:%M:%S'

sep('timestamp')
xnow_ts = time.time()
print(time.ctime(xnow_ts))

sep('struct_time')
xnowst = time.localtime(xnow_ts)
print(time.asctime(xnowst))

sep('format')
xnowst_str = time.strftime(FMT, xnowst)
print(xnowst_str)

sep('parse')
xnowst2 = time.strptime(xnowst_str, FMT)
print(time.asctime(xnowst2))
